import scrapy
from scrapy import Request

class TeacherSpider(scrapy.Spider):
    name = 'Teacher'
    allowed_domains = ['www.gliet.edu.cn']
    start_urls = ['http://www.gliet.edu.cn/gra/jsfw/sssds.htm']

    def parse(self, response):
        extract = response.xpath('//*[@id="lblbody"]/table[3]/tbody/tr/td/table/tbody/tr[4]/td[2]/div/table/tbody/tr/td/a/@href').extract()
        for teacher in extract:
            print(teacher)
            yield Request(teacher,callback=self.parseteacher)

    def parseteacher(self, response):
        print(1)
        extract = response.xpath('//p[@class=new_text]/text()').extract()
        print(extract)